Skip to content

fix: keep usage reporting off once it is turned off - #101

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed
Nov 19, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Usage reporting is now kept off once it has been turned off, following the fail-closed change in the trace client (Stephenson-Software/trace-client-java#51).

  • TraceClient.java re-vendored at trace-client-java 0.7.0 -> 0.8.0: TRACE_USAGE_REPORTING set to anything but blank/true/on/yes/1, or DO_NOT_TRACK set to anything but blank/0/false/off/no, turns reporting off.
  • Fail-open path fixed in Parpt itself: usage-reporting.enabled switched reporting off only for false, so off, no, 0, a typo or a blank USAGE_REPORTING_ENABLED= left it on. It is now read through TraceClient.allowsReporting; the default true still applies when the property is not set at all.
  • README documents the fail-closed values.

Tests

The switch test that pinned no and 0 as "on" now checks that they, blank values and typos are off, and that true/on/yes/1 are on. ./gradlew test: 197 tests, all passing.

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

Re-vendor trace-client-java 0.8.0 (every opt-out fails closed) and read
usage-reporting.enabled through TraceClient.allowsReporting: it used to
switch off only for "false", so off, no, 0 or a blank
USAGE_REPORTING_ENABLED left reporting on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Results

197 tests  ±0   197 ✅ ±0   2s ⏱️ ±0s
 25 suites ±0     0 💤 ±0 
 25 files   ±0     0 ❌ ±0 

Results for commit efc6a4d. ± Comparison against base commit 1450c11.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
com.preponderous.parpt.trace.UsageReporterTest ‑ onlyFalseIgnoringCaseAndSpacesSwitchesReportingOff(Path)
com.preponderous.parpt.trace.UsageReporterTest ‑ anythingButAnOnValueSwitchesReportingOff(Path)

@dmccoystephenson
dmccoystephenson merged commit d4b17a7 into main Nov 19, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the fix/opt-out-fails-closed branch November 19, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant